package InsertionSort;

public class InsertionSort {
    public static void sort(int[] a){
           Insertion(a,1);
    }
    public static void Insertion(int[] a,int low){
     if(low == a.length){
         return;
     }
        int m = a[low];
        int i = low - 1;
        while(i >= 0 && a[i] >=m){
          a[i+1] = a[i];
          i--;
        }
        a[i+1] = m;
        Insertion(a,low+1);
    }
}

